﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;

namespace MusicStore.Domain.POCO
{
    public class Album
    {
        [ScaffoldColumn(false)]
        public int AlbumId { get; set; }
        
        [Required(ErrorMessage="An album Title is reqiured")]
        [StringLength(160)]
        public string Title { get; set; }

        [Required(ErrorMessage="Price is required")]
        [Range(0.01,100.00,ErrorMessage="Price must be between 0.01 and 100.00")]
        public decimal Price { get; set; }

        [Display(Name="Album Art Url")]
        [StringLength(1024)]
        public string AlbumArtUrl { get; set; }

        [Display(Name="Artist")]
        public int ArtistId { get; set; }
        public virtual Artist Artist { get; set; }

        [Display(Name="Genre")]
        public int GenreId { get; set; }
        public virtual Genre Genre { get; set; }
    }
}
